home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7485 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  41 lines

  1. Path: mn5.swip.net!news
  2. From: dan.eriksson@vxjkatedral.se (Peter Liljenberg)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Fastest way to display things on a screen?
  5. Date: 17 Apr 1996 09:52:52 GMT
  6. Organization: VΣxj÷ Katedralskola
  7. Message-ID: <4l2f1k$eqt@mn5.swip.net>
  8. References: <4l0pi6$gus@mn5.swip.net>
  9. Reply-To: dan.eriksson@vxjkatedral.se (Peter Liljenberg)
  10. NNTP-Posting-Host: tty17-61.swipnet.se
  11. X-Newsreader: WinVN 0.92.2
  12.  
  13. In article <4l0pi6$gus@mn5.swip.net>, Ola.Lindgren@mailbox.swipnet.se (Daniel Hallgren) says:
  14. >
  15. >I'm thinking of writing a game, and I wonder which way is the best and fastest 
  16. >to display graphics on a customscreen opened with OpenScreenTagList()? 
  17. >Superbitmap windows are said to be very slow. To me, creating my own bitmap 
  18. >with InitBitMap() and attaching it to screen with the tag SA_BitMap and then 
  19. >render the graphics directly into the bitplanes seems the fastest way. Any 
  20. >ideas? BTW, is WaitTOF fast enough for games?
  21. >
  22. >        /Daniel
  23. >
  24. A superbitmap window is definitely overkill. There's two simple options:
  25. 1) Just write to the screens bitmap which you either let
  26. OpenScreenTagList() create, or supply your own. By having two bitmaps
  27. which you alternate between, i.e. draw on one and display the other, and 
  28. when the drawing is finished switch screens, so that you display the 
  29. newly drawn bitmap and draw on the other. This tecnique is called 
  30. Double Buffering. (In v39+ there's some functions for this in 
  31. graphics.library)
  32.  
  33. 2) Open a borderless backdrop window on which cover the entier screen. 
  34. This has the advantage that you can add gadget (gadtools too) to the 
  35. display.
  36.  
  37. WaitTOF() should be fast enough, since it only waits for the display beam 
  38. to reach the top of the display.
  39.  
  40.     Peter Liljenberg
  41.